Check that the widget is a GtkButton before casting.
authorTor Lillqvist <tml@novell.com>
Sun, 2 Mar 2008 19:51:00 +0000 (19:51 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 2 Mar 2008 19:51:00 +0000 (19:51 +0000)
2008-03-03  Tor Lillqvist  <tml@novell.com>

* modules/engines/ms-windows/msw_style.c (draw_box): Check that
the widget is a GtkButton before casting.

svn path=/trunk/; revision=19690

ChangeLog
modules/engines/ms-windows/msw_style.c

index 60ee4dfb4c7b837470879ad4cf3bcbd5540b6cfe..7c7adff9004b0e2ab89faaf3f2156c57788c1884 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-03  Tor Lillqvist  <tml@novell.com>
+
+       * modules/engines/ms-windows/msw_style.c (draw_box): Check that
+       the widget is a GtkButton before casting.
+
 2008-03-02  Johan Dahlin  <johan@gnome.org>
 
        * configure.in: Compare using = instead of ==, which is portable.
index aabf8f8e709a7774f4da681352c793c8740c354d..9c11b75bfc375f85ce5cd6e7101b358292b548c2 100755 (executable)
@@ -2017,8 +2017,8 @@ draw_box (GtkStyle *style,
            }
        }
       else if (is_toolbar_child (widget->parent)
-              || (GTK_RELIEF_NONE ==
-                  gtk_button_get_relief (GTK_BUTTON (widget))))
+              || (!GTK_IS_BUTTON (widget) ||
+                  (GTK_RELIEF_NONE == gtk_button_get_relief (GTK_BUTTON (widget)))))
        {
          if (draw_tool_button (window, widget, style, x, y,
                                width, height, state_type, area))